﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" Theme="SkinFile" Inherits="Nivdal.TranslateEnglish" Title="Edit english - nivdal.com" Codebehind="TranslateEnglish.aspx.cs" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadPlaceHolder" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:HiddenField ID="LanguageHiddenField" runat="server" />
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
    <div class="basic_element">
    <div class="red_title">
       <asp:Label ID="PageTitleLabel" runat="server" Text="<%$ Resources:Resource, TranslateEnglish_PageNameLabelText %>" CssClass="white_title"></asp:Label>
    </div>
    <div class="padding5">

    
    
    <asp:GridView ID="EnglshSentencesGridView" runat="server" SkinID="Professional" DataSourceID="TranslateDataSource"
     AutoGenerateColumns="false" AllowPaging="false">
        <Columns>
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:Label ID="SentenceNum" runat="server" Text='<%# Eval("SentenceNum") + "." + Eval("SentencePart") %>'
                     SkinID="GridLabel"></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:Label ID="SentenceNum" runat="server" Text='<%# Eval("SentenceNum") + "." + Eval("SentencePart") %>'
                     SkinID="GridLabel"></asp:Label>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:Label ID="SentenceTextLabel" runat="server" Text='<%# Bind("SentenceText") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <CustomControls:TextArea ID="SentenceTextTextBox" runat="server" Text='<%# Bind("SentenceText") %>' Width="500" Height="80"
                     TextMode="MultiLine" MaxLength="512"></CustomControls:TextArea>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:LinkButton ID="EditLinkButton" runat="server" Text="<%$ Resources:Resource, Global_Edit%>"
                     CommandName="Edit" SkinID="GreenTitleLink"></asp:LinkButton>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:HiddenField ID="HiddenField1" runat="server" Value='<%# Bind("SentenceId") %>' />
                    <asp:LinkButton ID="UpdateLinkButton" runat="server" Text="<%$ Resources:Resource, Global_Upload%>"
                     CommandName="Update" SkinID="GreenTitleLink"></asp:LinkButton>
                    <asp:LinkButton ID="CancelLinkButton" runat="server" Text="<%$ Resources:Resource, Global_Cancel%>"
                     CommandName="Cancel" SkinID="GreenTitleLink"></asp:LinkButton> 
                </EditItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    </div>
    </div>
    </ContentTemplate>
    </asp:UpdatePanel>
    <asp:SqlDataSource ID="TranslateDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
    SelectCommand="Nivdal_GetTranslateEnglishSentences" SelectCommandType="StoredProcedure"
    UpdateCommand="Nivdal_UpdateSentence" UpdateCommandType="StoredProcedure" >
        <UpdateParameters>
            <asp:Parameter Name="SentenceId" Type="Decimal" />
            <asp:Parameter Name="SentenceText" Type="String"/>   
            <asp:ControlParameter Name="Language" Type="Decimal" ControlID="LanguageHiddenField" PropertyName="Value" />
        </UpdateParameters>
    </asp:SqlDataSource>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="PageNamePlaceHolder" Runat="Server">
    <asp:Label ID="PageNameLabel" runat="server" Text="<%$ Resources:Resource, TranslateEnglish_PageNameLabelText %>" CssClass="PageNameContentStyle"></asp:Label>
</asp:Content>

